package com.jblv.frame.web.controller;

import com.jblv.frame.common.dto.PageResult;
import com.jblv.frame.common.message.Result;
import com.jblv.frame.user.api.dto.SysMenuDTO;
import com.jblv.frame.user.api.entity.SysMenu;
import com.jblv.frame.user.api.params.SysMenuListParams;
import com.jblv.frame.user.api.params.SysMenuParams;
import com.jblv.frame.user.api.vo.SysMenuListVO;

import java.util.List;

/**
 * @author happyonion.yangtao
 * @version 1.0
 * @title ISysMenuController
 * @projectName jblv-frame
 * @packageName com.jblv.web.controller
 * @description ISysMenuController 菜单Controller接口类
 * @date Create at 2020/5/26 22:21
 * @since jdk1.8
 */
public interface ISysMenuController {

    /**
     * 根据id获取菜单ID
     * @param id
     * @return SysMenu
     */
    Result<SysMenu> get(String id);

    /**
     * 获取菜单列表
     * @param params
     * @return PageResult
     */
    Result<PageResult<SysMenuDTO>> getList(SysMenuListParams params);

    /**
     * 创建菜单
     * @param sysMenuParams
     * @return Boolean
     */
    Result<String> save(SysMenuParams sysMenuParams);

    /**
     * 删除菜单根据ID
     * @param id
     * @return Boolean
     */
    Result<Boolean> del(String id);

    /**
     * 更新菜单
     * @param sysMenuParams
     * @return Boolean
     */
    Result<Boolean> update(SysMenuParams sysMenuParams);


    Result<List<SysMenuListVO>> getTree();
}
